<template>
  <div id='handOver' :class="['left', 'contentWidth' , {'mainBig': $store.state.isCollapse ,'mainSmall': !$store.state.isCollapse }]">
    <div class="header clearfix">
     <div class="backTo" v-show="isBackShow" @click="back">
    <img src="../../../static/images/back.png" alt="返回" />
     </div>
      <div class="contentTopLeft left">
        <h2>ICU病志</h2>
      </div>
      <maintopright></maintopright>
      <maintopleftbottom></maintopleftbottom>
    </div>
    <router-view></router-view>
  </div>
</template>
<script>
  import maintopright from '@/components/main/maintop/maintopRight'
  import maintopleftbottom from '@/components/main/maintop/maintopLeftBottom'
export default {
components:{
  maintopright,
  maintopleftbottom
},
 data(){
    return{
      isBackShow: false,
    }
    },
    watch: {
      $route: {
        handler(val, oldval) {
          //判断是否在体征指标详情页
          if (val.path.indexOf('/handOver/handOverList') != -1 ) {
            this.isBackShow = false
          } else {
            this.isBackShow = true;
          }

        },
      }
    },
    mounted() {
      this.isRoute();
    },
    methods: {
      back() {
        this.$router.back(-1);
        },
         isRoute() {
        //判断是否在体征指标详情页
           if (this.$route.path.indexOf('/handOver/handOverList') != -1 ) {
             this.isBackShow = false;
           } else {
             this.isBackShow = true;

        }
      }
    }
}
</script>
<style scoped>
</style>

